package com.tac.util;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

public class TimeSleepUtil {


    public static void tsleep(String time) throws ParseException, InterruptedException {
        long l = System.currentTimeMillis();
        SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        Date date = simpleDateFormat.parse(time);
        long time1 = date.getTime();
        long l1 = time1-l;
        System.out.println("等待:"+l1+"毫秒");
        Thread.sleep(l1);
    }
}
